package com.charmpeach.tsss.crawler;

import java.io.Serializable;

public class CourseTag implements Serializable
{
	private TagType type;
	private String couserID;
	private String message;
	
	public CourseTag(TagType type, String courseID, String message)
	{
		initialize(type, courseID, message);
	}
	
	public CourseTag(String str)
	{
		String tmp[] = str.split("/");
		
		initialize(TagType.valueOf(tmp[0]), tmp[1], tmp[2]);
	}
	
	public void initialize(TagType type, String courseID, String message)
	{
		this.type = type;
		this.couserID = courseID;
		this.message = message;
	}
	
	public String toString()
	{
		String str = "";
		str += type + "/";
		str += couserID + "/";
		str += message;
		return str;
	}
	
	public TagType getType()
	{
		return type;
	}
	public String getCouserID()
	{
		return couserID;
	}
	public String getMessage()
	{
		return message;
	}
}
